package 创建型模型.建造者模式;

public class ZQAirShipDirctor implements AirShipDiector {

    private ZQAirShipBuilder builder=null;

    public ZQAirShipDirctor(ZQAirShipBuilder builder) {
        this.builder = builder;
    }

    @Override
    public AirShip getAirShip() {
        Engine engine = builder.getEngine();
        OrbitalModule orbitalModule = builder.getOrbitalModule();
        AirShip a=new AirShip();
        a.setEngine(engine);
        a.setOrbitalModule(orbitalModule);
        return a;
    }
}
